﻿<div class="content-wrap research-listings">
    <div sustainalytics-navigation-menu navigation-menu-templateurl="Views/Menu/PageMenu.html" navigation-menu-sitemap="SITE" navigation-menu-startnodelevel="2"></div>
    <div class="content">
        <div class="content-pad">
            <div>
                <br />
                <div>
                    <b>First time user?</b> We recommend watching this brief tutorial:
                    <a href="" ng-click="subscribeToPortfolio.openVideoPopup()"> Portfolio Management and Monitoring </a>
                    <br /><br />
                </div>
                Use the Portfolio Monitoring tool to subscribe to our alerts service and receive email updates regarding changes in controversy assessments and outlooks for your portfolio constituents. By selecting <b>Add Alert</b> you will be prompted to select the frequency of alert notifications and the portfolios to be monitored.
                <br />
                <br />
            </div>

            <div class="title-section">
                <input type="button" value="Add alert" ng-disabled="subscribeToPortfolio.subscribeList.length > 0" class="btn-green" style="float: right; margin-top: 0;" ng-click="subscribeToPortfolio.addAlert()">
            </div>

            <div class="clear">&nbsp;</div><br />
            <div class="">
                <div style="width: 100%; overflow: auto;">
                    <div class="table">
                        <div class="table-row">
                            <div class="table-head width_200"><a href="" class="sortable_placeholder" ng-click="subscribeToPortfolio.setOrderByCol('NameLowercase');">Alert Name</a></div>
                            <div class="table-head width_370">Portfolio</div>
                            <div class="table-head center-align width_130">Frequency</div>
                            <div class="table-head center-align width_130">Actions</div>
                        </div>

                        <div ng-repeat="item in subscribeToPortfolio.subscribeList" class="{{$index % 2==1 ? 'table-row odd': 'table-row'}}">
                           
                            <div class="table-cell width_200" ng-class="{'last':$last}" style="border-left: 1px solid #e0e0e0;">{{item.alertName}}</div>
                            
                            <div class="table-cell width_370" ng-class="{'last':$last}">
                                <span ng-repeat="portfolio in item.portfolioList" class="sharedPortfolio">
                                    {{portfolio.portfolioName}}<span ng-show="!portfolio.isMyPortfolio"> *</span><span style="color: #5a6165" ng-hide="$last">,</span>
                                </span>
                            </div>
                            
                            <div class="table-cell width_130 center-align" ng-show="item.frequency == 1" ng-class="{'last':$last}">Semi-monthly</div>
                            <div class="table-cell width_130 center-align" ng-show="item.frequency == 2" ng-class="{'last':$last}">Monthly</div>
                            <div class="table-cell width_130 center-align" ng-show="item.frequency == 3" ng-class="{'last':$last}">Quarterly</div>
                            <div class="table-cell center-align" ng-class="{'last':$last}">
                                <div style="display: inline-block;">
                                    <div ng-init="true" ng-switch on="item.enabled == 1 ? true : false" style="float: left; margin-right: 5px;">
                                        <a href="" ng-switch-when='true' ng-class="!subscribeToPortfolio.hasEditPermission ? 'disabled' : ''" ng-disabled="!subscribeToPortfolio.hasEditPermission" ng-click='subscribeToPortfolio.disableAlert(item)'>Disable</a>
                                        <a href="" ng-switch-when='false' ng-disabled="!subscribeToPortfolio.hasEditPermission" ng-click='subscribeToPortfolio.enableAlert(item)'>Enable</a>
                                    </div>
                                    <a href="" style="float: left; margin-right: 5px;" ng-click="subscribeToPortfolio.editAlert(item)">Edit</a>
                                    <button style="float: left;" class="delete-sel-large" ng-disabled="!subscribeToPortfolio.hasEditPermission" ng-click="subscribeToPortfolio.deleteAlert(item.id)"></button>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div>
                    <div class="legend_square_gray">
                        <!--<div class="left">&nbsp;</div>-->
                        <div class="right">* Shared Portfolios</div>
                        <br />  
                        <div class="right">
                            Shared portfolios will automatically be removed from Alerts if they are deleted by the owner. 
                        </div>
                        <div class="clear"></div>
                    </div>
                    <!--<div class="legend_square_orange">
                        <div class="left">&nbsp;</div>
                        <div class="right">My Portfolios</div>
                        <div class="clear"></div>
                    </div>-->
                </div>
            </div>
        </div>
    </div>
</div>